(function(angular) {
	'use strict';
	angular.module('fs.waf').controller('cda.lookup.changeUserStatusController', changeUserStatusController);
	changeUserStatusController.$inject = [ '$scope', '$q', '$uibModalInstance', 'Constants', 'dialogsModule', 'gridService', 'modalService', 'layoutConfig', 'validatorConfig', 'authService', 'userService' ];
	function changeUserStatusController($scope, $q, $uibModalInstance, Constants, dialogsModule, gridService, modalService, layoutConfig, validatorConfig, authService, userService) {
		var ctrl = this, log = $scope.loggerFactory.getLogger("changeUserStatusLookup");
		ctrl.dialogsModule = dialogsModule;
		ctrl.layoutConfig = layoutConfig;
		ctrl.changeUserStatus = {};
		var param={
				userStatus : ctrl.dialogsModule.params.userStatus
		};
		userService.getLookupUserStatus(param).then(function(response) {
			var obj={};
			obj.data=response.data;
			ctrl.userStatusOptions =obj;
		});
		
		ctrl.ok = function() {
			if (!dialogsModule.btnCallback || !dialogsModule.btnCallback['ok'] || dialogsModule.btnCallback['ok'](ctrl.changeUserStatus) !== false) {
				$uibModalInstance.close();
			}
		};
		
		ctrl.close = function() {
			if (!dialogsModule.btnCallback || !dialogsModule.btnCallback['close'] || dialogsModule.btnCallback['close']() !== false) {
				$uibModalInstance.dismiss();
			}
		};
		
		ctrl.init = function() {
			authService.create(ctrl.changeUserStatus).then(function(response) {
			});
		};

	}
})(angular);
